package some;

/**
 * @Auther: luzhanshi
 * @Date: 2021/1/27 - 01 - 27 - 15:36 
 * @Description: some
 * @version: 1.0
 */
public class 换行符 {
    public static void main(String[] args) {
//        使用 System.getProperty(“line.separator”)来获取当前OS（系统）的换行符，可以在调试的情况下看到！
        /**
         * 各系统应当是:
         * /r Mac
         * /n Unix/Linux
         * /r/n Windows
         */
//        String property = System.getProperty("line.separator");
//        System.out.println("1"+property+"2");
        StringBuilder builder = new StringBuilder();
        StringBuilder builder1 = builder.append("1").append("2\r\n");
//        StringBuilder builder1 = builder.append("1").append("2\r\n").append("3");
        String newStr=builder1.toString();
        System.out.println(newStr);
    }
}
